<html>

<head>
<meta name=标题 content="">
<meta name=关键词 content="">
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 15 (filtered)">
<style>
<!--
 /* Font Definitions */
@font-face
	{font-family:"Courier New";
	panose-1:2 7 3 9 2 2 5 2 4 4;}
@font-face
	{font-family:Times;
	panose-1:0 0 5 0 0 0 0 2 0 0;}
@font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:DengXian;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:"\@DengXian";}
@font-face
	{font-family:"Microsoft YaHei";
	panose-1:2 11 5 3 2 2 4 2 2 4;}
@font-face
	{font-family:Menlo;
	panose-1:2 11 6 9 3 8 4 2 2 4;}
@font-face
	{font-family:"\@Microsoft YaHei";}
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:12.0pt;
	font-family:DengXian;}
code
	{font-family:Courier;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:21.0pt;
	font-size:12.0pt;
	font-family:DengXian;}
p.a, li.a, div.a
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	line-height:200%;
	font-size:12.0pt;
	font-family:"Microsoft YaHei";}
.MsoChpDefault
	{font-family:DengXian;}
 /* Page Definitions */
@page WordSection1
	{size:595.0pt 842.0pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	layout-grid:15.6pt;}
div.WordSection1
	{page:WordSection1;}
 /* List Definitions */
ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
-->
</style>

</head>

<body lang=ZH-CN style='text-justify-trim:punctuation'>

<div class=WordSection1 style='layout-grid:15.6pt'>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-size:14.0pt;line-height:200%;font-family:"Microsoft YaHei"'>chkconfig</span></b></p>

<p class=MsoNormal align=left style='margin-bottom:12.0pt;text-align:left;
text-indent:21.0pt;line-height:200%;text-autospace:none'><span
style='font-family:"Microsoft YaHei";color:black;vertical-align:sub'>启动或者关闭系统服务，设置服务的运行级别，该指令并不会立刻启动或者停止服务，而是在开机的时候发生效果。</span></p>

<p class=MsoNormal align=left style='margin-bottom:12.0pt;text-align:left;
text-indent:21.0pt;line-height:200%;text-autospace:none'><span lang=EN-US
style='font-family:"Microsoft YaHei";color:black;vertical-align:sub'>chkconfig</span><span
style='font-family:"Microsoft YaHei";color:black;vertical-align:sub'>提供了一个简单的命令行工具，用于维护<span
lang=EN-US>/etc/rc[0-6].d</span>目录层次结构，使系统管理员不必直接操作这些目录中的许多符号链接。这个<span
lang=EN-US>chkconfig</span>的实现受到<span lang=EN-US>IRIX</span>操作系统中的<span
lang=EN-US>chkconfig</span>命令的启发。但是，这个版本没有在<span lang=EN-US>/etc/rc[0-6].d</span>层次结构之外维护配置信息，而是直接管理<span
lang=EN-US>/etc/rc[0-6].d</span>中的符号链接。这将留下所有有关在单个位置启动服务<span lang=EN-US>init</span>的配置信息。</span></p>

<p class=MsoNormal align=left style='margin-bottom:12.0pt;text-align:left;
text-indent:21.0pt;line-height:200%;text-autospace:none'><span lang=EN-US
style='font-family:"Microsoft YaHei";color:black;vertical-align:sub'>chkconfig</span><span
style='font-family:"Microsoft YaHei";color:black;vertical-align:sub'>有五个不同的功能：添加用于管理的新服务、从管理中删除服务、列出服务的当前启动信息、更改服务的启动信息以及检查特定服务的启动状态。</span></p>

<p class=MsoNormal align=left style='margin-bottom:12.0pt;text-align:left;
text-indent:21.0pt;line-height:200%;text-autospace:none'><span
style='font-family:"Microsoft YaHei";color:black;vertical-align:sub'>当<span
lang=EN-US>chkconfig</span>后面只有一个服务名称的时候，它会检查服务是否配置为在当前运行级中启动。如果是，则<span
lang=EN-US>chkconfig</span>返回<span lang=EN-US>true</span>；否则返回<span lang=EN-US>false</span>。“<span
lang=EN-US>--level</span>”选项可以用来使<span lang=EN-US>chkconfig</span>查询指定运行级下的服务状态，而不是当前的运行级。当使用“<span
lang=EN-US>--list</span>”参数运行<span lang=EN-US>chkconfig</span>或根本没有参数时，将显示所有服务及其当前配置的清单。</span></p>

<p class=MsoNormal align=left style='margin-bottom:12.0pt;text-align:left;
text-indent:21.0pt;line-height:200%;text-autospace:none'><span
style='font-family:"Microsoft YaHei";color:black;vertical-align:sub'>如果在服务名称之后指定了<span
lang=EN-US>on</span>、<span lang=EN-US>off</span>、<span lang=EN-US>reset</span>或<span
lang=EN-US>resetpriorities</span>之一，则<span lang=EN-US>chkconfig</span>将更改指定服务的启动信息。<span
lang=EN-US>on</span>和<span lang=EN-US>off</span>标志将分别导致服务在被更改的运行级别中启动或停止。<span
lang=EN-US>reset</span>标志将服务的所有运行级别的<span lang=EN-US>on/off</span>状态重置为<span
lang=EN-US>init</span>脚本文件中指定的样子，重置的时候会有一个询问。而<span lang=EN-US>resetpriorities</span>标志则会直接将服务的<span
lang=EN-US>on/off</span>状态重置为<span lang=EN-US>init</span>脚本中指定样子。默认情况下，<span
lang=EN-US>on</span>和<span lang=EN-US>off</span>选项只影响运行级别<span lang=EN-US>2</span>、<span
lang=EN-US>3</span>、<span lang=EN-US>4</span>和<span lang=EN-US>5</span>，而<span
lang=EN-US>reset</span>和<span lang=EN-US>resetpriorities</span>影响所有运行级别。请注意，对于每个服务，每个运行级都有一个开始脚本或一个停止脚本。当切换<span
lang=EN-US>runlevel</span>时，<span lang=EN-US>init</span>将不会重新启动已经启动的服务，也不会重新停止未运行的服务。</span></p>

<p class=MsoNormal align=left style='margin-bottom:12.0pt;text-align:left;
text-indent:21.0pt;line-height:200%;text-autospace:none'><span lang=EN-US
style='font-family:"Microsoft YaHei";color:black;vertical-align:sub'>chkconfig</span><span
style='font-family:"Microsoft YaHei";color:black;vertical-align:sub'>还可以通过<span
lang=EN-US>xinetd.d</span>配置文件管理<span lang=EN-US>xinetd</span>脚本，<span
lang=EN-US>xinetd</span>服务只支持<span lang=EN-US>on</span>、<span lang=EN-US>off</span>、<span
lang=EN-US>--list</span>。</span></p>

<p class=MsoNormal align=left style='margin-bottom:12.0pt;text-align:left;
text-indent:21.0pt;line-height:200%;text-autospace:none'><span lang=EN-US
style='font-family:"Microsoft YaHei";color:black;vertical-align:sub'>chkconfig</span><span
style='font-family:"Microsoft YaHei";color:black;vertical-align:sub'>支持一个“<span
lang=EN-US>--type</span>”参数，当几个服务共享名字的情况下，这个选项就有效。支持该选项的服务可以是<span lang=EN-US>sysv</span>和<span
lang=EN-US>xinetd</span>。</span></p>

<p class=MsoNormal align=left style='margin-bottom:12.0pt;text-align:left;
text-indent:21.0pt;line-height:200%;text-autospace:none'><span
style='font-family:"Microsoft YaHei";color:black;vertical-align:sub'>此命令的适用范围：<span
lang=EN-US>RedHat</span>、<span lang=EN-US>RHEL</span>、<span lang=EN-US>Ubuntu</span>、<span
lang=EN-US>CentOS</span>、<span lang=EN-US>SUSE</span>、<span lang=EN-US>openSUSE</span>、<span
lang=EN-US>Fedora</span>。</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>1</span></b><b><span style='font-family:
"Microsoft YaHei"'>、语法</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>chkconfig  [--list]  [--type
type][name]</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>chkconfig  --add  name</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>chkconfig  --del  name</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>chkconfig - -override  name</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>chkconfig  [--level levels]  [--type
type]  name  &lt;on|off|reset|resetpriorities&gt;</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>chkconfig  [--level levels]  [--type
type]  name </span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><b><span
lang=EN-US style='font-family:"Microsoft YaHei"'>&nbsp;</span></b></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>2</span></b><b><span style='font-family:
"Microsoft YaHei"'>、选项列表</span></b></p>

<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 width="95%"
 style='width:95.0%;margin-left:24.1pt;border-collapse:collapse;border:none'>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  background:#E7E6E6;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>选项</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border:solid windowtext 1.0pt;
  border-left:none;background:#E7E6E6;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>说明</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>--help</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>帮助信息</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>--version</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>显示命令版本信息</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>--list </span><span style='font-family:
  "Microsoft YaHei"'>服务名</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>此选项列出<span
  lang=EN-US>chkconfig</span>所知道的所有服务，以及它们是在每个运行级别中停止还是启动。如果指定了名称，则仅显示有关服务名称的信息。</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>--add </span><span style='font-family:
  "Microsoft YaHei"'>服务名</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>增加服务。当添加新服务时，<span
  lang=EN-US>chkconfig</span>确保服务在每个运行级别上都有一个启动项或一个杀死项。如果任何运行级缺少这样的条目，<span
  lang=EN-US>chkconfig</span>将按照<span lang=EN-US>init</span>脚本中的默认值创建适当的条目。请注意，<span
  lang=EN-US>“INIT INFO”</span>部分中的默认条目优先于<span lang=EN-US>initscript</span>中的默认运行级别；如果存在任何必需的启动或要求停止条目，则将调整脚本的开始和停止优先级，以考虑这些依赖项。</span></p>
  </td>
 </tr>
 <tr style='height:21.15pt'>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt;height:21.15pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>--del </span><span style='font-family:
  "Microsoft YaHei"'>服务名</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt;height:21.15pt'>
  <p class=MsoNormal><span style='font-family:"Microsoft YaHei";color:black'>将服务从<span
  lang=EN-US>chkconfig</span>管理中删除，与它相关的<span lang=EN-US>/etc/rc[0-6].d</span>中的任何符号链接都被删除。</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>--level [levels] [name] [on|off|reset]</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>设置指定服务在指定运行级别的开机状态，级别可以是<span
  lang=EN-US>0~6</span>。例如<span lang=EN-US>: chkconfig –level 35 vsftpd on</span></span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>--override name</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>如果<span
  lang=EN-US>/etc/chkconfig.d/name</span>文件现在存在，并且与基础配置脚本不同，则更改服务名称的配置文件，而不使用基础配置。</span></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>3</span></b><b><span style='font-family:
"Microsoft YaHei"'>、关于运行级别</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
style='font-family:"Microsoft YaHei"'>每个应该由<span lang=EN-US>chkconfig</span>管理的服务都需要在其<span
lang=EN-US>init.d</span>脚本中添加两行或者多行注释。第一行告诉<span lang=EN-US>chkconfig</span>默认应该在什么运行级别启动服务，以及启动和停止优先级级别。如果服务在默认情况下不应该在任何运行级别中启动，则应该使用<span
lang=EN-US>“-”</span>来代替<span lang=EN-US>runlevel</span>列表。第二行包含服务的描述，并且可以通过反斜杠继续扩展多行。例如<span
lang=EN-US>random.init</span>中有三行注释</span></p>

<table class=a0 border=1 cellspacing=0 cellpadding=0 width="95%"
 style='width:95.0%;margin-left:24.1pt;border-collapse:collapse;border:none'>
 <tr style='height:14.9pt'>
  <td width=836 valign=top style='width:836.15pt;border:solid windowtext 1.0pt;
  background:#E7E6E6;padding:0cm 5.4pt 0cm 5.4pt;height:14.9pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'># chkconfig: 2345 20 80</span></p>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'># description: Saves and restores
  system entropy pool for \</span></p>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'># higher quality random number generation.</span></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>这意味着随机脚本应该在级别<span
lang=EN-US>2</span>、<span lang=EN-US>3</span>、<span lang=EN-US>4</span>和<span
lang=EN-US>5</span>中启动，它的开始优先级应该是<span lang=EN-US>20</span>，它的停止优先级应该是<span
lang=EN-US>80</span>。</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>chkconfig</span><span
style='font-family:"Microsoft YaHei"'>还支持从左到右的“<span lang=EN-US>-</span>”分隔符，并将优先于可用的<span
lang=EN-US>“chkconfig</span>：<span lang=EN-US>”</span>行应用它们。例如下面的：</span></p>

<table class=a0 border=1 cellspacing=0 cellpadding=0 width="95%"
 style='width:95.0%;margin-left:24.1pt;border-collapse:collapse;border:none'>
 <tr style='height:14.9pt'>
  <td width=836 valign=top style='width:836.15pt;border:solid windowtext 1.0pt;
  background:#E7E6E6;padding:0cm 5.4pt 0cm 5.4pt;height:14.9pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>### BEGIN INIT INFO</span></p>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'># Provides: foo</span></p>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'># Required-Start: bar</span></p>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'># Defalt-Start: 2 3 4 5</span></p>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'># Default-Stop: 0 1 6</span></p>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'># Description: Foo init script</span></p>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>### END INIT INFO</span></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>在这种情况下，<span
lang=EN-US>“foo”</span>的启动优先级将被更改，它将高于<span lang=EN-US>“bar”</span>启动优先级。在添加依赖项时必须小心，因为它们可能导致许多脚本的启动和停止优先级发生巨大变化。</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-family:"Microsoft YaHei"'>4</span></b><b><span style='font-family:
"Microsoft YaHei"'>、实例</span></b></p>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>1</span><span
style='font-family:"Microsoft YaHei"'>）查看所有服务</span></p>

<table class=a0 border=1 cellspacing=0 cellpadding=0 width="95%"
 style='width:95.0%;margin-left:24.1pt;border-collapse:collapse;border:none'>
 <tr style='height:14.9pt'>
  <td width=836 valign=top style='width:836.15pt;border:solid windowtext 1.0pt;
  background:#E7E6E6;padding:0cm 5.4pt 0cm 5.4pt;height:14.9pt'>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  ~]# <b>chkconfig --list</b></span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>NetworkManager    0:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>关闭</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>  1:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>关闭</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>  2:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>启用</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>  3:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>启用</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>  4:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>启用</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>  5:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>启用</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>  6:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>关闭</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Helvetica'>    …</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span style='font-size:
  10.0pt;line-height:200%;font-family:DengXian'>基于</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>
  xinetd </span></code><code><span style='font-size:10.0pt;line-height:200%;
  font-family:DengXian'>的服务：</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>    chargen-dgram:
     </span></code><code><span style='font-size:10.0pt;line-height:200%;
  font-family:DengXian'>关闭</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>    chargen-stream:   </span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>关闭</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>    </span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Helvetica'>…</span></code></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>2</span><span
style='font-family:"Microsoft YaHei"'>）查看指定服务</span></p>

<table class=a0 border=1 cellspacing=0 cellpadding=0 width="95%"
 style='width:95.0%;margin-left:24.1pt;border-collapse:collapse;border:none'>
 <tr style='height:14.9pt'>
  <td width=836 valign=top style='width:836.15pt;border:solid windowtext 1.0pt;
  background:#E7E6E6;padding:0cm 5.4pt 0cm 5.4pt;height:14.9pt'>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  ~]# <b>chkconfig --list vsftpd</b></span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>vsftpd          0:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>关闭</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>  1:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>关闭</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>  2:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>关闭</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>  3:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>关闭</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>  4:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>关闭</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>  5:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>启用</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>  6:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>关闭</span></code></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='text-indent:21.0pt;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>3</span><span
style='font-family:"Microsoft YaHei"'>）设置<span lang=EN-US>ftp</span>服务在<span
lang=EN-US>3</span>和<span lang=EN-US>5</span>这两个级别启动</span></p>

<table class=a0 border=1 cellspacing=0 cellpadding=0 width="95%"
 style='width:95.0%;margin-left:24.1pt;border-collapse:collapse;border:none'>
 <tr style='height:14.9pt'>
  <td width=836 valign=top style='width:836.15pt;border:solid windowtext 1.0pt;
  background:#E7E6E6;padding:0cm 5.4pt 0cm 5.4pt;height:14.9pt'>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  ~]# <b>chkconfig --level 35 vsftpd on    //</b></span></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>级别</span></b></code><code><b><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>3</span></b></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>和</span></b></code><code><b><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>5</span></b></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>启动</span></b></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  ~]# <b>chkconfig --list vsftpd             //</b></span></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>查看是否设置成功</span></b></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>vsftpd          0:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>关闭</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>  1:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>关闭</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>  2:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>关闭</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>  3:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>启用</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>  4:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>关闭</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>  5:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>启用</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>  6:</span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>关闭</span></code></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal align=center style='text-align:center;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>Copyright@david 
zhytwj2018@163.com</span></p>

</div>

</body>

</html>
